﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using CommunitySystemModel;
using CommunitySystem.BO.SystemManager;

namespace CommunitySystem.Web.Service
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IMQService" in both code and config file together.
    [ServiceContract]
    public interface IMQService
    {
        [OperationContract]
        void DoWork();

        #region RKXX
        [OperationContract]
        List<RKXXViewDb> GetRKXXViewDbByCondition(string nameStr, int xb, string sfz, List<string> mqlx,
            List<string> zylb, string zzmm = "", string judz = "", string rklb = "", string hjdz = "", string xz = "", string whcd = "", DateTime? sDate = null, DateTime? eDate = null);

        [OperationContract]
        int InsertBAS_RKXXModel(BAS_RKXXModel rkxxModel, List<RKXXFamilyMemberActionObj> cuMembers = null);

        [OperationContract]
        bool UpdateBAS_RKXXModel(BAS_RKXXModel rkxxModel, List<RKXXFamilyMemberActionObj> cuMembers = null);

        [OperationContract]
        BAS_RKXXModel GetBAS_RKXXModelByID(int id);

        [OperationContract]
        List<BAS_RKXXModel> GetRKXXMemberViewDbByFwId(int fwId, int cuRkxxId = 0);

        [OperationContract]
        List<DataDictionaryItemModel> GetDictionaryByParentId(int parentId);

        [OperationContract]
        List<DataDictionaryItemModel> GetChildDictionaryByDictName(string dictName);
        #endregion

        #region  居委
        /// <summary>
        /// 获取居委信息
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        [OperationContract]
        List<BAS_CJWXXModel> GetBAS_CJWXXModelList(int Id = 0);
        /// <summary>
        /// 添加居委
        /// </summary>
        /// <param name="_BAS_CJWXXModel"></param>
        /// <returns></returns>
        [OperationContract]
        int InsertBAS_CJWXXModel(BAS_CJWXXModel _BAS_CJWXXModel);
        /// <summary>
        /// 修改居委信息
        /// </summary>
        /// <param name="_BAS_CJWXXModel"></param>
        /// <returns></returns>
        [OperationContract]
        bool UpdateBAS_CJWXXModel(BAS_CJWXXModel _BAS_CJWXXModel);
        /// <summary>
        /// 删除居委
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        [OperationContract]
        bool DeleteBAS_CJWXXModelById(int id);
        #endregion

        #region 小区
         [OperationContract]
        List<BAS_XQXXModel> GeBAS_XQXXModelList(int Id = 0,int jwId=0);
         [OperationContract]
        int InsertBAS_XQXXModel(BAS_XQXXModel _BAS_XQXXModel);
         [OperationContract]
        bool UpdateBAS_XQXXModel(BAS_XQXXModel _BAS_XQXXModel);
         [OperationContract]
        bool DeleteBAS_XQXXModelById(int id);
        #endregion

        #region 房屋
         [OperationContract]
         bool AddInitHouseInfo(int xqId, int cens, int mds, int mdInits, string msEX, int hus, int huInits, string huEX);
           [OperationContract]
         List<BAS_FWXXModel> GetBAS_FWXXModelByXqId(int xqId = 0);
           [OperationContract]
           List<BAS_FWXXModel> GetBAS_FWXXModelByXqIdAndHao(string HaoEx, int xqId = 0, int Hao = 0);
           [OperationContract]
           bool AddFWInfo(List<BAS_FWXXModel> addFW);
           [OperationContract]
           bool DeleteFwByFwID(int fwId);
           [OperationContract]
           bool UpdateBAS_FWXXModel(BAS_FWXXModel _BAS_FWXXModel);
        #endregion

        #region  块区管理
         [OperationContract]
           List<SimpleObject<int, string, int,string, bool>> GetXqAndHaoInfo(int kqId = 0, int CJWID = 0);
         [OperationContract]
         List<BAS_KQXXModel> GetBAS_KQXXModelList(int Kqid = 0, int CwId = 0);
         [OperationContract]
         bool AddKQInfo(BAS_KQXXModel _BAS_KQXXModel);
        [OperationContract]
         bool UpdateKQInfo(BAS_KQXXModel _BAS_KQXXModel);
        [OperationContract]
        bool DeleteKQByID(int kqId);

         [OperationContract]
        List<BAS_KQRY> GetBAS_KQRYList(int KQId = 0, int kqRYId = 0);
         [OperationContract]
         bool AddKQRy(BAS_KQRY _BAS_KQRY);
         [OperationContract]
         bool UpdateKQRy(BAS_KQRY _BAS_KQRY);
         [OperationContract]
         bool DeleteKQRyById(int id);

        #endregion

        #region 组团服务
         [OperationContract]
         List<string> GetBAS_RKXXInfo();

         [OperationContract]
         List<MQ_XQCZModel> GetMQ_XQCZModelByCondition(DateTime? zfStarDate, DateTime? zfEndDate,
          DateTime? djStarDate, DateTime? djEndDate, string zfdx = "",
          List<string> lb = null, string djrName = "", string zjhm = "", string jjqks = "", string jzdz = "", int Id = 0);

         [OperationContract]
         BAS_RKXXModel GetBAS_RKXXModelBySFZHAndName(string sfzh, string name);

         [OperationContract]
         BAS_KQXXModel GetMQDAKQViewDisposalCondition(int RKId = 0, string sfzh = "", string dshXm = "");

         [OperationContract]
         int UpdateMQ_XQCZModel(MQ_XQCZModel adis);

         [OperationContract]
         int InsertMQ_XQCZModel(MQ_XQCZModel adis);

         [OperationContract]
         int DeleteMQ_XQCZModelById(int id);
        #endregion

         #region 统计分析
         /// <summary>
         /// 人口总数
         /// </summary>
         /// <returns></returns>
         [OperationContract]
          List<AnlysisEntity> GetRKZS();

        /// <summary>
        /// 年龄分析
        /// </summary>
        /// <returns></returns>
         [OperationContract]
         List<AnlysisEntity> GetAgeFX();
        
         #endregion
    }
}
